# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gucharmap
pkgver=15.1.2
pkgrel=1
pkgdesc="GNOME Unicode Charmap"
url="https://wiki.gnome.org/Apps/Gucharmap"
arch="all"
license="GPL-3.0-or-later GFDL-1.3-only"
makedepends="
	desktop-file-utils
	glib-dev
	gobject-introspection-dev
	gtk+3.0-dev
	itstool
	meson
	pcre2-dev
	perl
	unicode-character-database>=${pkgver/.*/}.0.0
	unzip
	vala
	"
subpackages="$pkgname-dev $pkgname-lang"
source="https://gitlab.gnome.org/GNOME/gucharmap/-/archive/$pkgver/gucharmap-$pkgver.tar.gz"

build() {
	# Disable docs due to https://github.com/mesonbuild/meson/issues/5843
	abuild-meson \
		-Ducd_path=/usr/share/unicode \
		-Ddocs=false \
		output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
246e52313f191b0b123e2831bf5a9ae0228c09c8190393dd1cc3c6677e0a92412152c9622d592351d8f0033be3ff3b255b64d198fedd5ecc78559c82397fdee0  gucharmap-15.1.2.tar.gz
"
